﻿using CDMS.DAL;
using CDMS.Entities;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace CDMS.BLL
{
    public class Customer_BLL
    {
        Customer_DAL db;
        public Customer_BLL()
        {
            db = new Customer_DAL();
        }

        public DataTable GetALL()
        {
            return db.GetALL();
        }

        public DataTable GetAllByCustomerGroupID(int CustomerGroupID)
        {
            return db.GetAllByCustomerGroupID(CustomerGroupID);
        }

        public DataTable Search(string KeyWord, string ColumnName, bool FromFirstChar)
        {
            return db.Search(KeyWord, ColumnName, FromFirstChar);
        }
        public Customer GetOne(int Customer_ID)
        {
            
            return db.GetOne(Customer_ID);
        }

        public int Insert(Customer entity)
        {
            return db.Insert(entity);
        }
        public bool Update(Customer entity)
        {

            return db.Update(entity);
        }
        public bool Exists(Customer entity)
        {

            return db.Exists(entity);
        }
        public bool Delete(int Customer_ID)
        {
            return db.Delete(Customer_ID);
        }
    }
}
